<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var a;

        /**
         * 定义函数
         */
        function calc(num1, num2){
            console.log(num1)
            console.log(num2)
            var sum = num1 + num2
            return sum
        }
        

        // 调用函数
        // var sum = calc(2,4)
        // console.log(sum)
        // console.log(calc(2,4))

        // console.log(calc(2,4,7))
        // console.log(calc(2))

        /**
         * 可变长参数
         */ 
         function f1(a, ...b){
            console.log(a)
            console.log(b)
         }

        //  f1(11, 22, 33, 44)

        /**
         * 展开运算符
         */ 
        // console.log(Math.max(32, 5, 120, 6))

        var scores = [99, 100, 80, 70, 69]
        console.log(Math.max(...scores))
    </script>
</head>
<body>
    
</body>
</html>